﻿<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
    <title>首页-计算机易学实验室</title>
    <meta property="wb:webmaster" content="b825003a46faf30e" />
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=2491159632" type="text/javascript" charset="utf-8"></script>
    <script type='text/javascript' src='./js/libs/jquery-1.8.3.min.js'></script>
    <script type='text/javascript' src='./js/libs/stock/estock.js'></script>
    <script type='text/javascript' src='./js/libs/stock/sina.js'></script>
    <style type="text/css">
        @import "/skin/default/index.css";
        @import "/skin/default/datatable.css";
        #container{
            width:865px;
        }
    </style>
    <script type='text/javascript'>
        $(function(){
            WB2.anyWhere(function(W){
                W.widget.connectButton({
                    id: "wb_connect",
                    type: '7,5',
                    callback : {
                        login:function(o){},
                        logout:function(){}
                    }
                });
            });
            
            var eStock = new EStock();
            var eStockTable = EStockTable.getInstance("estocks");
            eStockTable.setEStock(eStock);            
            function changeStocks_hq(symbols){
                var hqURL = 'http://hq.sinajs.cn/rn=$rn&list=';
                getScript(hqURL.replace('$rn', Math.random()) + symbols.join(','), function(){
                    for(symbol in eStock.stocks){
                        eStock.updateStockMarket(symbol, hqParser.a(window["hq_str_" + symbol]));
                    }
                });
                window.setTimeout(function(){changeStocks_hq(symbols);}, 1e3)
            };
            function changeStocks_var(symbols){
                var jsvarURL = "http://finance.sina.com.cn/realstock/company/@symbol@/jsvar.js";
                for(var i = 0; i < symbols.length; i++){
                    getScript(jsvarURL.replace("@symbol@", symbols[i]), function(){
                        eStock.updateStockFundamental(papercode, flag, currcapital, totalcapital, profit_four, mgjzc);
                    });
                }
            };            
            eStock.addEventListener(EStockEvents.StocksChange, changeStocks_hq);
            eStock.addEventListener(EStockEvents.StocksChange, changeStocks_var);
            $.getJSON("stocks.js", function(stocks){
                eStock.setStocks(stocks);
            });
        });
    </script>
</head>
<body> 
    <div id="container">
        <div id="header">
            <div id="top_nav">
                <div id="wb_connect" class="right"></div>
            </div>        
            <div id="logo"></div>  
            <div id="banner">
                <script type="text/javascript"><!--
                //google_ad_client = "ca-pub-9931267086020699";
                /* 计算机易学实验室-banner */
                //google_ad_slot = "1269632621";
                //google_ad_width = 234;
                //google_ad_height = 60;
                //-->
                </script>
                <!--<script type="text/javascript"
                src="http://pagead2.googlesyndication.com/pagead/show_ads.js">-->
                </script>
            </div>
        </div>
        <div id="body">
            <div id="estocks"></div>
        </div>
        <div id="footer">
            <script type="text/javascript">
            
              var _gaq = _gaq || [];
              _gaq.push(['_setAccount', 'UA-37167064-1']);
              _gaq.push(['_trackPageview']);
            
              (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
              })();
            
            </script>
        </div>
    </div> 
</body>
</html>